#include "stdafx.h"
#include "test.h"
#include "resource.h"

#include "MyTestDlg.h"
#include "MyModalLessDlg.h"

void first_dll_test()
{
	MessageBox(NULL, _T("hello"), _T("aaa"), MB_OK);
}

void first_dll_modal() {
	MyTestDlg dlg;
	dlg.DoModal();
}

void* first_dll_create_modalless() {
	CDialog *pDlg = new CMyModalLessDlg;
	if (!pDlg->Create(IDD_DIALOG2)) {
		MessageBox(NULL, _T("create modalless failed!"), _T("xxx"), MB_OK);
		return NULL;
	}
	pDlg->ShowWindow(SW_SHOW);

	return pDlg;
}

void first_dll_free_modalless(void* handle) {
	CDialog* pData = (CDialog*)handle;
	if (pData) {
		delete pData;
	}
}